<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>背景和颜色</title>
  <style>
    h1{color: #ff0000}
    h2{color:#f0f}
    h3{color:rgb(255,0,0)}
    h4{color:rgba(255,0,0,0.2)}

    #d2{
        background-color: purple;
        width: 200px;
        height: 200px;
        background-image: url("../b.jpg");
        background-size: 100px 100px;
        background-repeat: no-repeat;/*禁止重复*/
        /*背景图片位置:横向 纵向*/
       /* background-position: 50px 50px;*/
        background-position: 0% 100%;

    }
    #d1{
        width: 611px ;
        height: 376px;
        background-color: #E8E8E8;
        background-image: url("http://doc.canglaoshi.org/tstore_v1/images/itemCat/study_computer_img1.png");
        background-repeat: no-repeat;
        background-size: 318px 319px;
        background-position: 90% 75%;

    }

  </style>
</head>
<body>
<div id="d1"></div>
<div id="d2">背景图片测试</div>
<h1>颜色测试</h1>
<h2>颜色测试</h2>
<h3>颜色测试</h3>
<h4>颜色测试</h4>

</body>
</html>























